using System;
using System.Collections.Generic;
using System.Text;

using Mud.Common.Messages;
using Mud.Server.Users;
using Mud.Server.Physical;


namespace Mud.Server.Client
{
    public interface IClient : IServerObject
    {

         /// <summary>
        /// Queue where the event messages are stored.
        /// This queue is processed with ProcessEventQueue method and the events
        /// stored there are processed.
        /// </summary>
        Queue<IMessage> EventQueue
        {
            get;
        }

        /// <summary>
        /// Status of this client.
        /// </summary>
        ClientStatus Status
        {
            get;
            set;
        }

        /// <summary>
        /// Gets the date when the client was created.
        /// </summary>
        DateTime DateCreated
        {
            get;
        }

        /// <summary>
        /// User that this client represents.
        /// </summary>
        User User
        {
            get;
        }

		/// <summary>
		/// Current creature controler asociated with this client.
		/// </summary>
		ClientCreatureControler CreatureControler {
			get;
		}

        /// <summary>
        /// Processes the command.
        /// </summary>
		/// <returns>True if there was a command and it was processed.</returns>
        bool ProcessCommand();

        /// <summary>
        /// Processes the event queue.
        /// </summary>
		/// <returns>Number of events processed.</returns>
        int ProcessEventQueue();

        /// <summary>
        /// Called by the server to disconnect the client.
        /// </summary>
        void DisconnectClient();

    }


    public enum ClientStatus
    {
        Ready = 1,
        Disconnected = 2
    }
}
